package cmd

import (
	"context"
	"devops-super/internal/service"
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gcmd"
)

var (
	CronProcess = gcmd.Command{
		Name:  "CronProcess",
		Usage: "CronProcess",
		Brief: "start CronProcess",
		Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
			SetTimezone(ctx)
			g.Log().Info(ctx, "CronProcess start ..")
			register()

			err = service.Cron().StartCrons(ctx)

			return err
		},
	}
)
